VDL Help VDL Grammar =========== VDLProgram ::= Statement* Statement ::= CommandName [ “(” [Parameters] “)” ] “;” | “Layout” [ “(” [ViewOpts] “)” ] Body | “HList” [ “(” [ListOpts] “)” ] Body | “VList” [ “(” [ListOpts] “)” ] Body | “DynamicHList” “(” AttrSpec, TypeName [“,” DLOpts] “)” Statement | “DynamicVList” “(” AttrSpec, TypeName [“,” DLOpts] “)” Statement | “Switch” “(” AttrSpec [“,” ViewOpts] “)” SwitchBody | “Margin” “(“ Parameters “)” Statement | “Label” “(“ Parameters “)” Statement | “Tag” “(” string “)” Statement Body ::= Statement “;” | “{” Statement* “}” SwitchBody ::= “{” SwitchEntry* “}” SwitchEntry ::= SwitchLabel+ Statement SwitchLabel ::= “case” number “:” | “default” “:” Parameters ::= Parameter | ViewOpts | Parameter “,” Parameters Parameter ::= AttrSpec | Expression | string Expression ::= (as in EDL, but must be a constant expression) ViewOpts ::= ViewOption | ViewOption “,” ViewOpts ViewOption ::= “Width” “=” Parameter | “UseParent” | “Height” “=” Parameter | “UseParent” | “Left” “=” Parameter | “Top” “=” Parameter | “BackColor” “=” “{” Parameter “,” Parameter “,” Parameter “}” | “Alignment” “=” (“Left” | “Right” | “Center”) ListOpts ::= ListOption | ListOption “,” ListOpts ListOption ::= “HScroll” | “VScroll” | ViewOption DLOpts ::= DLOption | DLOption “,” DLOpts DLOption ::= “EditHandles” | ListOption AttrSpec ::= AttrName AttrSuffix* | “*” AttrSuffix+ AttrSuffix ::= “.” AttrName CommandName ::= identifier ;see below for a list of commands TypeName ::= identifier ;name of an element type AttrName ::= identifier ;attribute name in some element Command summary =============== Layout [options] HList [options] VList [options] DynamicHList(attrName, entryTypeName [, options]) DynamicVList(attrName, entryTypeName [, options]) Switch(attrName [, options]) { [ case : ; ] [ default: ; ] } Margin(left, top, right, bottom [, frameStyle, frameLoc , options]) Label(string, style [, options]) Tag(string) EditText(attrName [, filter] [, options]); Signed(bitCount) - bitCount can be 1-32 Unsigned(bitCount) - bitCount must be 8, 16, or 32 UnsignedHex(bitCount) - bitCount must be 8, 16, or 32 Fixed(x.y) - A signed fixed-point value. x and y must sum to either 16 or 32. UnsignedFixed(x.y) - Similarly, for unsigned values. Chars(charCount) - A character string. charCount must be 1, 2, or 4. Date - A standard Macintosh date value. Options for EditText Label: Label = Literal String LabelWidth = Integer LabelAlignment = [Left, Right or Center] The last two Label options will be ignored if the “Label” option is missing. Additional Optional params for EditText: These params have no values, simply put the param name in the optional parameter list to signify a value of “true”, and leave it out for “false”: SingleLine - Make the edit text be 1 line tall, no matter how much text is in it. FlushImmediately - Flush edit changes to the data after every keystroke. DropOnReturn - drop the text selection as soon as a return key is hit. NoSmartQuotes - only use quotes from Yogi Berra NoFrame - don’t draw the 1 pixel frame and 2 pixel margin around the text. EditHex(attrName, resizable, columnCount, [, options]); CheckBox(title, attrName [, options]); RadioButton(title, attrName, value [, options]); PushButton(title, attribute, actionProcName); DefaultButton(title, attribute, actionProcName); CancelButton(title, attribute, actionProcName); BooleanPopup(title, titleWidth [, options]) { BoolItem(itemTitle, attrName); ;repeated one or more times } IntegerPopup(title, titleWidth, attrName [, options]) { IntItem(itemTitle, itemValue); ;repeated one or more times } ElementPopup( title, listAttr, itemNameAttr, selAttr, titleWidth [, options] ); FontPopup(title, titleWidth, attrName [, options]); StaticText (param [, options]); EditorButton("title", elementField, "VDL Name", "Title Prefix"); PICT(id [, options]); ICON(id [, options]); ics4(id [, options]); ics8(id [, options]); Spacer [(options)]; //Note: cicns from the working resource file will not be displayed, only cicns in the //far application itself will appear, cicn(id, options); PopupColorControl(redAttr, greenAttr, blueAttr [,options]) { ColorItem(red, green, blue); ;repeated one or more times } ColorControl(redAttr, greenAttr, blueAttr [,options]); DefaultPopupColorControl(redAttr, greenAttr, blueAttr [,options]); DeclareNamedStatment(“StatementName”) Statement(); IncludeNamedStatement(“StatementName”[,options]); View options ============ Width = Expression | “UseParent” Height = Expression | “UseParent” Left = Expression Top = Expression BackColor = {redvalue,greenvalue,bluevalue} Alignment = Left | Right | Center HScroll VScroll Editable